home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / stngpasm / pure_c / include / uran / uran_app.sh < prev    next >
Encoding:
Text File  |  1997-08-08  |  15.1 KB  |  614 lines

  1. ;----------------------------------------------------------------------------
  2. ;File name:    URAn_APP.SH            Revision date:    1997.08.08
  3. ;Creator:    Ulf Ronald Andersson        Creation date:    1992.11.30
  4. ;(c)1992 by:    Ulf Ronald Andersson        All rights reserved
  5. ;Released as:    FREEWARE            (commercial sale forbidden)
  6. ;----------------------------------------------------------------------------
  7. ;File purpose:    Macro library for general application header
  8. ;----------------------------------------------------------------------------
  9. ;Required header declarations:
  10. ;
  11. ;    include    "uran\STRUCT.SH"
  12. ;    include    "uran\URAn_SYS.SH"
  13. ;    include    "uran\URAn_LA.SH"
  14. ;    include    "uran\URAn_DOS.SH"
  15. ;    include    "uran\URAn_GEM.SH"
  16. ;    include    "uran\URAn_APP.SH"
  17. ;
  18. ;----------------------------------------------------------------------------
  19. ;
  20. exec_timeout    set    0
  21. exec_message    set    0
  22. keep_windows    set    0
  23. ;
  24. ;----------------------------------------------------------------------------
  25. ;Remarks:
  26. ;    This file should be included at the head of a program to make it
  27. ;    able to run as either ACC, APP, GTP, PRG, TOS, or TTP.
  28. ;
  29. ;
  30. ;Defined variables/arrays:
  31. ;
  32. ;rz        'relative zero' for internal references
  33. ;basepage_p    -> program's base page
  34. ;tsr_size    .L size of BASEPAGE+TEXT+DATA+BSS  (only TOS/TTP may TSR)
  35. ;progtype    .L indicates program type:
  36. ;  ...            $0000.$FFFF == TOS/TTP/boot_PRG
  37. ;  ...            $0000.ap_id == APP/GTP/non_boot_PRG
  38. ;  ...            $FFFF.ap_id == ACC
  39. ;acc_flag    is the high word of 'progtype'
  40. ;tos_flag    is the low word of 'progtype'
  41. ;app_id        alias tos_flag
  42. ;bootflag    .W $FFFF == PRG booted from AUTO (also sets 'tos_flag')
  43. ;menu_id    .W menu id for an ACC, otherwise null
  44. ;g_handle    .W workstation handle for ACC/APP/GTP/non_boot_PRG
  45. ;vwk_handle    .W virtual workstation handle
  46. ;contrl        12 words for AES/VDI control data
  47. ;
  48. ;MiNT_p        .L NULL or -> MiNT structure
  49. ;MagX_p        .L NULL or -> MagX structure
  50. ;nAES_p        .L NULL or -> nAES structure
  51. ;Gnva_p        .L NULL or -> Gnva structure
  52. ;
  53. ;wk_x_rez \
  54. ;wk_y_rez  \/ from
  55. ;wk_pix_w  /\ opnvwk
  56. ;wk_pix_h /
  57. ;
  58. ;NB: rz and/or contrl will only be created if not already defined
  59. ;NB: if symbol 'huge_program' is defined, above data is in TEXT section (else in BSS)
  60. ;NB: defining 'huge_program' also makes internal calls use 'jsr' (instead of bsr)
  61. ;
  62. ;Required user arrays:
  63. ;
  64. ;id_app_name_s:    dc.b    'APPNAME ',NUL    ;name in APPL_FIND format
  65. ;acc_name:    dc.b    '  Acc name'    ;for ACC menu registration
  66. ;message:    ds.w    8        ;evnt_mesag message pipe
  67. ;intin:        ds.w    30        ;30 words or more for AES/VDI
  68. ;intout:    ds.w    45        ;45 words or more for AES/VDI
  69. ;ptsin:        ds.w    30        ;30 words or more for VDI
  70. ;ptsout:    ds.w    12        ;12 words or more for VDI output coordinates
  71. ;        ds.l    100        ;subroutine stack >= 100 longs
  72. ;mystack:    ds.l    1        ;top of subroutine stack
  73. ;
  74. ;
  75. ;Required user routines:
  76. ;
  77. ;init_app    called for ACC/APP/GTP/non_boot_PRG to init application,
  78. ;        but doesn't need appl_init, graf_handle, or v_opnvwk,
  79. ;        nor does an ACC need menu_register.
  80. ;        Suitable use is for initialization of object trees.
  81. ;NB:  for ACC    menu_register is called between init_app and exec_app
  82. ;
  83. ;exec_app    called to execute the main application regardless of type,
  84. ;        but doesn't need v_clsvwk, or appl_exit, or ACC appl_mesag.
  85. ;        This call will be repeated for a reactivated ACC.
  86. ;        Non_acc programs should have exit code in d0 at RTS.
  87. ;        (See details at 'Exit codes:' below)
  88. ;
  89. ;    At entry to either of these two routines:
  90. ;
  91. ;        d6.W    == bootflag    \
  92. ;        d7.L    == progtype     > See descriptions above.
  93. ;        a6.L    == rz        /
  94. ;
  95. ;Optional user routines:
  96. ;
  97. ;exec_timer    Called for ACC that has a defined constant 'exec_timeout',
  98. ;        whenever evnt_multi produces such a timer event.
  99. ;        The constant is placed as long at 'main_timeout', and may
  100. ;        there be dynamically adjusted by the program.
  101. ;
  102. ;exec_mesag    Called for ACC that has a defined constant 'exec_message',
  103. ;        whenever evnt_multi/evnt_mesag produces messages that are
  104. ;        not AC_OPEN  (such as VA_START).
  105. ;
  106. ;        .if the constant 'keep_windows' is also set, the workstation
  107. ;        will not be closed at each return (you must obey AC_CLOSE).
  108. ;        This places a word == $FF00 at 'keep_wind_f', and if the top
  109. ;        byte is cleared the workstation closure is enabled again.
  110. ;
  111. ;NB:    Top bit of the word 'revise_type_f' is used for 3 purposes:
  112. ;   1:    Let ACC start 'exec_app' directly without awaiting event.
  113. ;   2:    Let APP delay 'exec_app' until an event occurs.
  114. ;   3:    Let APP loop back for more events after 'exec_app'
  115. ;The flag can be set by 'init_app' in the first two cases, and in case 3
  116. ;should be set/cleared in 'exec_app' to decide whether to exit program.
  117. ;
  118. ;Exit codes:    At exit from exec_app, d0 has the following effects
  119. ;        when the program was not started as accessory.
  120. ;
  121. ; negative    => Pterm(d0)            => error code exit
  122. ; 0        => Pterm(d0)            => error free exit
  123. ; 0x0000ADD0    => Ptermres(tsr_size,0)        => error free resident exit
  124. ; 0x0000ADD1    => Ptermres(d1,0)        => error free resident exit
  125. ; 0x0000ADD0    => Ptermres(d1,d2)        => error code resident exit
  126. ;
  127. ;GEM programs additionally use the necessary GEM exit functions
  128. ;before actually terminating by either of the above methods.
  129. ;----------------------------------------------------------------------------
  130. ;    The start_app macro generates all the code of this library,
  131. ;    but 'make    GEM_links' is also needed before end of program
  132. ;    when further GEM functions are used by the application.
  133. ;----------------------------------------------------------------------------
  134. ;
  135.     .macro    start_app
  136. ;
  137.     .text
  138. ;
  139. rz:                ;relative zero
  140.     move.l    sp,a1
  141.     lea    mystack(pc),sp
  142.     move.l    a0,a5
  143.     move.l    a0,d7        ;is a0 nonzero ? (accessory)
  144.     seq    menu_id        ;generate non_matching menu_id for non_ACC
  145.     sne    d7
  146.     ext    d7
  147.     ext.l    d7
  148.     clr.l    d6
  149.     lea    rz(pc),a6
  150.     move    d7,progtype
  151.     bmi.s    .doacc_1
  152.     move.l    4(a1),a5
  153.     move.l    bp_textlen(a5),a0
  154.     add.l    bp_datalen(a5),a0
  155.     add.l    bp_bss_len(a5),a0
  156.     lea    $100(a0),a0
  157.     move.l    a0,tsr_size
  158.     gemdos    Mshrink,#0,(a5),a0
  159. .doacc_1:
  160.     xbios    Supexec,OS_check_1(pc)
  161.     move.l    a5,basepage_p    ;store basepage_p
  162.     tst.l    d7
  163.     bmi.s    .doacc_2        ;skip APP/TOS tests for ACC
  164. ;
  165.     tst.l    nAES_p
  166.     bne    .no_vqaes_test        ;skip vqaes_test under nAES
  167. ;
  168.     moveq    #-1,d6
  169.     vq_aes
  170.     beq    .TOS_type        ;assume TOS if AES disabled
  171. .no_vqaes_test:
  172. ;
  173. ;;;    tst.l    nAES_p
  174. ;;;    bne    .no_mousevisi_test        ;skip mousevisi_test under nAES
  175. ;
  176.     clr.l    d6
  177.     _a_init
  178.     tst    la_m_hid_ct(a0)
  179.     bne    .TOS_type        ;assume TOS if mouse invisible
  180. .no_mousevisi_test:
  181. ;
  182. .doacc_2:
  183.     move    #-1,intout
  184.     sub_aes    #appl_init        ;appl_init
  185.     move    d0,d7
  186.     move.l    d7,progtype        ;progtype = acc_flag.ap_id
  187.     move    d7,ap_id-rz(a6)
  188. ;
  189.     tst.l    d7
  190.     bmi    .start_acc        ;go init ACC
  191. ;
  192.     tst    d7
  193.     bmi    .TOS_type        ;assume TOS if ap_id negative
  194. ;
  195. ;;;    tst.l    nAES_p
  196. ;;;    bne    .no_nametest        ;skip nametest under nAES
  197. ;
  198.     move.b    bp_arglen(a5),d0
  199.     cmp.b    #$7F,d0
  200.     blo.s    .try_shel_read        ;skip ARGV test if none used
  201.     move.l    bp_environ_p(a5),a0
  202.     move.l    a0,d0
  203.     beq.s    .try_shel_read        ;skip ARGV test if no environment
  204. .seek_argv:
  205.     lea    argv_s(pc),a1
  206. .test_argv_1:
  207.     move.b    (a0)+,d0
  208.     beq.s    .test_argv_3
  209.     cmp.b    (a1)+,d0
  210.     beq.s    .test_argv_1
  211. .test_argv_2:
  212.     tst.b    (a0)+            ;passed current non_argv string ?
  213.     bne.s    .test_argv_2
  214.     bra.s    .test_argv_4
  215. ;
  216. .test_argv_3:
  217.     tst.b    (a1)            ;Found ARGV=\0 ?
  218.     beq.s    .seek_ext_argv
  219. .test_argv_4:
  220.     tst.b    (a0)            ;test more environment strings ?
  221.     bne.s    .seek_argv
  222.     bra.s    .try_shel_read
  223. ;
  224. .seek_ext_argv:
  225.     bsr    seek_name
  226.     move.b    d0,d3
  227.     bne.s    .have_name
  228. .try_shel_read:
  229.     gemdos    Malloc,#$200
  230.     tst.l    d0
  231.     ble.s    .no_nametest
  232.     move.l    d0,a4
  233.     clr.b    (a4)
  234.     gem_aes    shel_read,(a4),$100(a4)
  235.     move.l    a4,a0
  236.     bsr    seek_name
  237.     move.b    d0,d3
  238.     gemdos    Mfree,(a4)
  239. .have_name:
  240.     tst.b    d3
  241.     beq.s    .unappl_TOS
  242.     cmp.b    #'T',d3
  243.     beq.s    .unappl_TOS
  244. .no_nametest:
  245. ;
  246.     bsr    .opnvwk_sub
  247.     bgt.s    .good_app
  248.     lea    vwk_fail_s(pc),a0
  249.     move    a0,addrin-rz(a6)
  250.     sub_aes    #form_alert
  251.     bra.s    .unappl_TOS        ;refuse ACC/APP if v_opnvwk failed
  252. ;
  253. .clsvwk_TOS:
  254.     sub_vdi    #v_clsvwk,vwk_handle(pc)
  255.     clr    vwk_handle
  256. .unappl_TOS:
  257.     sub_aes    #appl_exit
  258. .TOS_type:
  259.     move.l    #$ffff,d7
  260.     move.l    d7,progtype    ;clear acc_flag, set tos_flag < 0
  261.     move    d6,bootflag
  262.     bra.s    .init_app_1        ;go start TOS/TTP program
  263. ;
  264. .start_acc:
  265.     bsr    .opnvwk_sub
  266.     bgt.s    .register_acc
  267.     illegal                ;bomb rather than run without vwk
  268. ;
  269. .register_acc:
  270.     move    d7,intin        ;Register ACC in menu.
  271.     move.l    #acc_name,addrin-rz(a6)
  272.     sub_aes    #menu_register
  273.     move    d0,menu_id
  274.     bra.s    .init_app_1
  275. ;
  276. .good_app:
  277.     cmp    #2,intout+80    ;mouse allowed ?
  278.     blo.s    .clsvwk_TOS
  279. .init_app_1:
  280.     .ifne    _deblev>=1
  281.     bsr    .go_init_app
  282.     .else
  283.     bsr    init_app
  284.     .endif
  285.     lea    rz(pc),a6
  286.     move    bootflag(pc),d6
  287.     move.l    progtype(pc),d7        ;d7 bit 31 flags ACC/APP
  288.     move.l    revise_type_f,d0    ;d0 bit 31 flags reversed ACC/APP roles
  289.     eor.l    d7,d0
  290.     bpl    .active            ;do not wait for normal APP, or revised ACC
  291. ;
  292. ;------------------------------------
  293. ;    Main Accessory Event Loop
  294. ;
  295. .acc_loop:
  296.     tst    vwk_handle
  297.     ble.s    .acc_wait
  298.     tst.b    keep_wind_f
  299.     bne.s    .acc_wait
  300.     sub_vdi    #v_clsvwk,vwk_handle(pc)    ;close vwk for ACC
  301.     clr    vwk_handle
  302. .acc_wait:
  303.     move.l    #message,addrin-rz(a6)    ;Wait for a menu call.
  304. ;
  305.     .ifeq    exec_timeout        ;cond:    .ifeq exec_timeout
  306.     sub_aes    #evnt_mesag
  307.     .else                ;else:
  308.     move    #MU_MESAG|MU_TIMER,intin
  309.     move    main_timeout+2(pc),intin+28
  310.     move    main_timeout(pc),intin+30
  311.     sub_aes    #evnt_multi
  312.     btst    #b_MU_MESAG,d0        ;message_event ?
  313.     bne.s    .do_message
  314.     btst    #b_MU_TIMER,d0        ;timer_event ?
  315.     beq.s    .acc_wait        ;oops, this shouldn't happen
  316.     .ifne    _deblev>=1        ;cond:    .ifne _deblev>>=1
  317.     bsr.s    .go_exec_time
  318.     .else                ;else:
  319.     bsr    exec_timer
  320.     .endif                ;ends:    .ifne _deblev>=1
  321.     bra.s    .acc_fix        ;go fixup regs for next event
  322.     .endif                ;ends:    .ifeq exec_timeout
  323. ;
  324. .do_message:
  325.     lea    message(pc),a0
  326.     move    (a0),d0
  327.     cmp    #AC_OPEN,d0
  328.     .ifeq    exec_message        ;cond:    .ifeq exec_message
  329.     bne.s    .acc_wait        ;Not a call we know, carry on waiting.
  330.     .else                ;else:
  331.     beq.s    .do_AC_OPEN
  332.     .ifne    _deblev>=1        ;cond:    .ifne _deblev>>=1
  333.     bsr.s    .go_exec_mess
  334.     .else                ;else:
  335.     bsr    exec_mesag
  336.     .endif                ;ends:    .ifne _deblev>=1
  337.     bra.s    .acc_fix
  338.     .endif                ;ends:    .ifeq exec_message
  339. .do_AC_OPEN:
  340.     move    8(a0),d0
  341.     cmp    menu_id(pc),d0
  342.     bne.s    .acc_wait        ;Not a call for us, carry on waiting.
  343.     bsr    .opnvwk_sub        ;reopen vwk for ACC
  344.     ble.s    .acc_wait        ;back to waiting loop if no vwk free
  345. .active:                ;time to go to work
  346.     .ifne    _deblev>=1
  347.     bsr.s    .go_exec_app
  348.     .else
  349.     bsr    exec_app
  350.     .endif
  351. .acc_fix:
  352.     lea    rz(pc),a6
  353.     move    bootflag(pc),d6
  354.     move.l    progtype(pc),d7
  355.     bmi    .acc_loop        ;if .ACC, return to desktop by evnt_mesag
  356.     tst    revise_type_f
  357.     bmi    .acc_loop        ;if type revised use eventloop for APP too
  358. ;
  359. .exit_nonacc:
  360.     move.l    d0,d6            ;d6  = err_code / null
  361.     move.l    d1,d4
  362.     move.l    d2,d5
  363.     tst    vwk_handle
  364.     beq.s    .skip_close
  365.     sub_vdi    #v_clsvwk,vwk_handle(pc)
  366.     clr    vwk_handle
  367. .skip_close:
  368.     tst    d7
  369.     bmi.s    .TOS_exit
  370.     sub_aes    #appl_exit
  371. .TOS_exit:
  372.     clr.l    d0
  373.     move    d6,d0
  374.     cmp.l    d6,d0
  375.     bne.s    .main_term
  376.     sub    #$ADD0,d0
  377.     blo.s    .main_term
  378.     cmp    #1,d0
  379.     bgt.s    .main_tsr_2
  380.     beq.s    .main_tsr_1
  381. .main_tsr_0:
  382.     move.l    tsr_size(pc),d4
  383. .main_tsr_1:
  384.     clr.l    d5
  385. .main_tsr_2:
  386.     gemdos    Ptermres,d4,d5
  387. ;
  388. .main_term:
  389.     tst.l    d6
  390.     ble.s    .terminate
  391.     clr.l    d6
  392. .terminate:
  393.     gemdos    Pterm,d6
  394. ;
  395. ;
  396. .opnvwk_sub:
  397.     tst    vwk_handle
  398.     bgt.s    .done_opnvwk
  399.     sub_aes    #graf_handle
  400.     move    d0,g_handle
  401.     lea    intin(pc),a0
  402.     moveq    #11-1,d0
  403. .work_in_lp:
  404.     move    #1,(a0)+
  405.     dbra    d0,.work_in_lp
  406.     addq    #1,-(a0)
  407.     sub_vdi    #v_opnvwk,g_handle(pc)
  408.     lea    intout(pc),a0
  409.     lea    wk_x_rez(pc),a1
  410.     move    (a0)+,(a1)
  411.     addq    #1,(a1)+
  412.     move    (a0)+,(a1)
  413.     addq    #1,(a1)+
  414.     addq    #2,a0
  415.     move    (a0)+,(a1)+
  416.     move    (a0)+,(a1)+
  417.     move    contrl+12(pc),vwk_handle
  418. .done_opnvwk:
  419.     tst    vwk_handle
  420.     rts
  421. ;
  422. ;
  423.     .ifne    _deblev>=1
  424. .go_init_app:
  425.     move.l    #'Init',d0
  426.     bsr    init_app
  427.     rts
  428.     .endif
  429. ;
  430.     .ifne    _deblev>=1
  431. .go_exec_app:
  432.     move.l    #'Exec',d0
  433.     bsr    exec_app
  434.     rts
  435.     .endif
  436. ;
  437.     .ifne    _deblev>=1
  438. .go_exec_time:
  439.     move.l    #'Time',d0
  440.     bsr    exec_timer
  441.     rts
  442.     .endif
  443. ;
  444.     .ifne    _deblev>=1
  445. .go_exec_mess:
  446.     move.l    #'Mess',d0
  447.     bsr    exec_mesag
  448.     rts
  449.     .endif
  450. ;
  451. ;----------------------------------------------------------------------------
  452. ;
  453. OS_check_1:
  454.     move    sr,-(sp)
  455.     ori    #$0700,sr
  456.     move.l    (_cookies).w,a0
  457. .cook_loop_1:
  458.     movem.l    (a0)+,d0/d1
  459.     tst.l    d0
  460.     beq.s    .done_cookies
  461.     lea    OS_check_1_t(pc),a1
  462. .cook_loop_2:
  463.     movem.l    (a1)+,d2/a2
  464.     tst.l    d2
  465.     beq.s    .cook_loop_1
  466.     cmp.l    d2,d0
  467.     bne.s    .cook_loop_2
  468.     move.l    d1,(a2)
  469.     bra.s    .cook_loop_1
  470. ;
  471. .done_cookies:
  472.     move    (sp),sr
  473. ;
  474.     _a_init
  475.     move.l    d0,line_a_base_p
  476. ;
  477.     move.l    #$602C,currbp_p_p    ;Some old TOS had this (but maybe not all)
  478.     xbios    Keytbl,-1.w,-1.w,-1.w
  479.     move.l    d0,a0
  480.     lea    -1(a0),a0    ;NB: this assumes Kbshift stored at Keytbl-1
  481.     move.l    a0,kbshift_p    ;NB: So all early TOS have Kbshift data at Keytbl-1 !!!
  482.     move.l    (_sysbase).w,a1
  483.     move.l    os_selfbeg_p(a1),a0
  484.     move    os_version(a0),d0
  485.     cmp    #$102,d0
  486.     blo.s    .done_sys_fix
  487.     move.l    os_kbshift_p(a0),kbshift_p
  488.     move.l    os_currbp_p_p(a0),currbp_p_p
  489. .done_sys_fix:
  490. ;
  491.     move    (sp)+,sr
  492.     rts
  493. ;
  494. ;----------------------------------------------------------------------------
  495. ;
  496. seek_name:
  497.     clr.l    d2
  498.     move.b    (a0),d2
  499.     beq.s    .name_tested
  500.     moveq    #'T',d2
  501. .seek_name_loop:
  502.     move.l    a0,a1
  503. .find_name:
  504.     move.b    (a0)+,d0
  505.     beq.s    .name_found
  506.     cmp.b    #'\',d0
  507.     beq.s    .seek_name_loop
  508.     bra.s    .find_name
  509. ;
  510. .name_found:
  511.     lea    id_app_name_s,a0
  512.     moveq    #8-1,d1
  513. .name_loop:
  514.     move.b    (a1)+,d0
  515.     beq.s    .back_pad_name
  516.     cmp.b    #'.',d0
  517.     beq.s    .back_pad_name
  518.     move.b    d0,(a0)+
  519.     dbra    d1,.name_loop
  520.     bra.s    .find_ext
  521. ;
  522. .back_pad_name:
  523.     subq    #1,a1
  524. .pad_name_loop:
  525.     move.b    #' ',(a0)+
  526.     dbra    d1,.pad_name_loop
  527. .find_ext:
  528.     move.b    (a1)+,d0
  529.     beq.s    .name_tested
  530.     cmp.b    #'.',d0
  531.     bne.s    .find_ext
  532.     move.b    (a1)+,d2
  533. .name_tested:
  534.     move    d2,d0
  535.     rts
  536. ;
  537. ;----------------------------------------------------------------------------
  538. ;
  539.     .ifeq    huge_program
  540.     .data
  541.     .endif
  542. ;
  543. vwk_fail_s:
  544.     dc.b    '[1]'
  545.     dc.b    '[No workstation available]'
  546.     dc.b    '[Exit]',NUL
  547. ;
  548. argv_s:
  549.     dc.b    'ARGV=',NUL
  550.     even
  551. ;
  552.     .ifne    exec_timeout
  553.     even
  554. main_timeout:    dc.l    exec_timeout
  555.     .endif    ;exec_timeout
  556. ;
  557.     .ifne    keep_windows
  558. keep_wind_f:    dc.w    $FF00
  559.     .else
  560. keep_wind_f:    dc.w    $0000
  561.     .endif
  562. ;
  563. OS_check_1_t:
  564.     dc.l    'MiNT',MiNT_p
  565.     dc.l    'MagX',MagX_p
  566.     dc.l    'nAES',nAES_p
  567.     dc.l    'Gnva',Gnva_p
  568.     dc.l    NUL
  569. ;
  570. ;----------------------------------------------------------------------------
  571. ;
  572.     .ifeq    huge_program
  573.     .bss
  574.     .endif
  575. ;
  576. tsr_size:    ds.l    1
  577. basepage_p:    ds.l    1
  578. acc_flag:
  579. progtype:    ds.w    1    ;hi.w=acc_flag  lo.w=tos_flag == app_id
  580. app_id:
  581. tos_flag:    ds.w    1
  582. bootflag:    ds.w    1
  583. menu_id:    ds.w    1
  584. g_handle:    ds.w    1
  585. vwk_handle:    ds.w    1
  586. revise_type_f:    ds.w    1    ;top bit flags ACC behaves more like APP et vv.
  587. ;
  588. wk_x_rez:    ds.w    1    ;horizontal resolution
  589. wk_y_rez:    ds.w    1    ;vertical resolution
  590. wk_pix_w:    ds.w    1    ;pixel width
  591. wk_pix_h:    ds.w    1    ;pixel height
  592. ;
  593. MiNT_p:        ds.l    1    ;NULL or -> MiNT structure
  594. MagX_p:        ds.l    1    ;NULL or -> MagX structure
  595. nAES_p:        ds.l    1    ;NULL or -> nAES structure
  596. Gnva_p:        ds.l    1    ;NULL or -> Gnva structure
  597. ;
  598. line_a_base_p:    ds.l    1    ;-> line_a variable base
  599. kbshift_p:    ds.l    1    ;-> kbshift byte of OS
  600. currbp_p_p:    ds.l    1    ;-> OS var -> current basepage
  601. ;
  602. contrl:
  603.     ds.w    12
  604. ;
  605.     .text
  606. ;
  607.     make    GEM_links
  608. ;
  609.     .endm    ;start_app
  610. ;
  611. ;----------------------------------------------------------------------------
  612. ;    End of file:    URAn_APP.SH
  613. ;----------------------------------------------------------------------------
  614.